/*
 * @Author: WangZhiYu <w19165802736@163.com>
 * @Date: 2025-04-21 13:44:37
 * @LastEditTime: 2025-04-22 09:52:03
 * @LastEditors: WangZhiYu <w19165802736@163.com>
 * @Descripttion: 
 */
import Vue from 'vue'
import Router from 'vue-router'
import i18n from '@/i18n'

Vue.use(Router)

export default new Router({
    // mode: "hash", // 去掉url中的#
    routes: [
        {
            path: '/login',
            component: resolve => require(['@/view/login'], resolve),
            meta: {
                title: i18n.tc('message.login')
            },
        },
        {
            path: '/Share/:id',
            component: resolve => require(['@/view/Share'], resolve),
            meta: {
                title: i18n.tc('message.Share')
            },
        },
        {
            path: '/share1/:id/:name',
            component: resolve => require(['@/view/Share/share1.vue'], resolve),
            meta: {
                title: i18n.tc('message.share1')
            },
        },
        {
          path: '/shareTab/:name',
          component: resolve => require(['@/view/Share/shareTab.vue'], resolve),
            meta: {
                title: i18n.tc('message.share1')
            },
        },
        {
            path: '/share2/:name',
            component: resolve => require(['@/view/Share/share2.vue'], resolve),
            meta: {
                title: i18n.tc('message.share2')
            },
        },
        {
            path: '/',
            component: resolve => require(['@/view/index/index'], resolve),
            meta: {
                title: i18n.tc('message.homePage')
            },
            redirect: to => {
                return '/login'
            },
            children: [
                // 新页面开始
                {
                    path: '/New',
                    component: resolve => require(['@/view/New/index'], resolve),
                    meta: {
                        title: i18n.tc('message.homePage')
                    },
                },
                {
                    path: '/PCVideo',
                    component: resolve => require(['@/view/New/PCVideo'], resolve),
                    meta: {
                        title: i18n.tc('message.video')
                    },
                },
                {
                    path: '/MbVideo',
                    component: resolve => require(['@/view/New/MbVideo'], resolve),
                    meta: {
                        title: i18n.tc('message.video')
                    },
                },

            ],
        },

    ]
})
